# Maintainer: Peter Budai <peterbudai@hotmail.com>

_realname=Test-Needs
pkgname=perl-${_realname}
pkgver=0.002006
pkgrel=1
pkgdesc="Skip tests when modules not available"
arch=('any')
url="https://metacpan.org/release/Test-Needs"
groups=('perl-modules')
depends=('perl')
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/H/HA/HAARG/Test-Needs-${pkgver}.tar.gz")
sha256sums=('77f9fff0c96c5e09f34d0416b3533c3319f7cd0bb1f7fe8f8072ad59f433f0e5')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
